package com.gao.util;

import com.gao.servlet.UserServlet;
import org.springframework.web.WebApplicationInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;

/**
 * @author gao
 * @time 2020/12/23 22:37:10
 */
public class MyWebApplicationInitializer implements WebApplicationInitializer {
    public void onStartup(ServletContext servletContext) throws ServletException {
        ServletRegistration.Dynamic userServlet = servletContext.addServlet("UserServlet", UserServlet.class);
        userServlet.addMapping("/user_abc");
    }
}
